﻿/*
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace RobotSchema.StartTrading
{
    /// <summary>
    /// Логика взаимодействия для StartMainWindow.xaml
    /// </summary>
    public partial class StartMainWindow : Window
    {
        public StartMainWindow()
        {
            InitializeComponent();
        }
    }
}
*/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Ecng.Xaml;


namespace Sample.StartTrading
{
    /// <summary>
    /// Логика взаимодействия для MainWindow.xaml
    /// </summary>
    public partial class StartMainWindow : Window
    {
       private readonly RoboViewerBasic _roboViewerBasic = new RoboViewerBasic();
  //     public static StartMainWindow Instance { get; private set; }

        public StartMainWindow()
        {
            InitializeComponent();
  //          StartMainWindow.Instance = this;

           _roboViewerBasic.MakeHideable();
        }


        protected override void OnClosing(CancelEventArgs e)
        {
            _roboViewerBasic.DeleteHideable();
            _roboViewerBasic.Close();
           
         base.OnClosing(e);
        }


        private void RoboViewerStart(object sender, RoutedEventArgs e)
        {
            MainWindow.ShowOrHide(_roboViewerBasic);
        }


    }
}
